"""
    create by IAmFiveHigh on 2023/9/5
"""
from link_list import LinkList
from link_list_stack import LinkListStack


if __name__ == '__main__':

    print("-" * 10, "linkList", "-" * 10)

    l1 = LinkList()
    l1.add_first(100)
    l1.add_last(200)
    l1.add_last(300)
    l1.add_last(400)
    l1.add(1, 150)

    print(l1)
    l1.set(1, 180)
    print(l1)

    print(f"l1.remove(1) =  {l1.remove(1)}")
    print(l1)

    print(f"l1.remove_last =  {l1.remove_last()}")
    print(l1)

    print("-" * 10, "stack", "-" * 10)

    s1 = LinkListStack()
    for i in range(10):
        s1.push(i * 100)
        print(s1)

    for i in range(5):
        s1.pop()
        print(s1)



